package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.CardExtractCodeEntity;
import com.dragon.modules.yuegou.enums.wallet.CardExtractCodeStage;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 悦卡赠送提取码 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:35
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CardExtractCodeQuery extends CardExtractCodeEntity implements Query<CardExtractCodeEntity> {

    /** 提取码ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 悦卡赠送ID查询条件 */
	@JsonUnwrapped(prefix = "cardPresentId")
	private Condition<String> cardPresentIdCondition;

    /** 会员ID（赠送方）（冗余）查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 悦卡模板ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 会员悦卡ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 提取码查询条件 */
	@JsonUnwrapped(prefix = "extractedCode")
	private Condition<String> extractedCodeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "extractedMemberId")
	private Condition<String> extractedMemberIdCondition;

    /** 提取时间查询条件 */
	@JsonUnwrapped(prefix = "extractedTime")
	private Condition<LocalDateTime> extractedTimeCondition;

    /** 赠送生成的悦卡ID（旧悦卡保留）查询条件 */
	@JsonUnwrapped(prefix = "extractedMemberCardId")
	private Condition<String> extractedMemberCardIdCondition;

    /** [枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件 */
	@JsonUnwrapped(prefix = "stage")
	private Condition<CardExtractCodeStage> stageCondition;

    /** 赠送时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 失效时间查询条件 */
	@JsonUnwrapped(prefix = "expiredTime")
	private Condition<LocalDateTime> expiredTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CardExtractCodeQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CardExtractCodeQuery(CardExtractCodeEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CardExtractCodeQuery(CardExtractCodeQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.cardPresentIdCondition != null) {
			this.cardPresentIdCondition = other.cardPresentIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.extractedCodeCondition != null) {
			this.extractedCodeCondition = other.extractedCodeCondition.copy();
		}
		if(other.extractedMemberIdCondition != null) {
			this.extractedMemberIdCondition = other.extractedMemberIdCondition.copy();
		}
		if(other.extractedTimeCondition != null) {
			this.extractedTimeCondition = other.extractedTimeCondition.copy();
		}
		if(other.extractedMemberCardIdCondition != null) {
			this.extractedMemberCardIdCondition = other.extractedMemberCardIdCondition.copy();
		}
		if(other.stageCondition != null) {
			this.stageCondition = other.stageCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.expiredTimeCondition != null) {
			this.expiredTimeCondition = other.expiredTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CardExtractCodeEntity> toQueryWrapper() {
		QueryWrapper<CardExtractCodeEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (cardPresentIdCondition != null) {
			cardPresentIdCondition.toWrapper(wrapper, COL_CARD_PRESENT_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (extractedCodeCondition != null) {
			extractedCodeCondition.toWrapper(wrapper, COL_EXTRACTED_CODE);
		}
		if (extractedMemberIdCondition != null) {
			extractedMemberIdCondition.toWrapper(wrapper, COL_EXTRACTED_MEMBER_ID);
		}
		if (extractedTimeCondition != null) {
			extractedTimeCondition.toWrapper(wrapper, COL_EXTRACTED_TIME);
		}
		if (extractedMemberCardIdCondition != null) {
			extractedMemberCardIdCondition.toWrapper(wrapper, COL_EXTRACTED_MEMBER_CARD_ID);
		}
		if (stageCondition != null) {
			stageCondition.toWrapper(wrapper, COL_STAGE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (expiredTimeCondition != null) {
			expiredTimeCondition.toWrapper(wrapper, COL_EXPIRED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回提取码ID查询条件
	 * 
	 * @return idCondition 提取码ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取提取码ID查询条件
	 * 
	 * @return idCondition 提取码ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置提取码ID查询条件
	 * 
	 * @param idCondition 提取码ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回悦卡赠送ID查询条件
	 * 
	 * @return cardPresentIdCondition 悦卡赠送ID查询条件
	 */
	public Condition<String> cardPresentId() {
		this.cardPresentIdCondition = new Condition<>();
		return this.cardPresentIdCondition;
	}
	
	/**
	 * 获取悦卡赠送ID查询条件
	 * 
	 * @return cardPresentIdCondition 悦卡赠送ID查询条件
	 */
	public Condition<String> getCardPresentIdCondition() {
		return cardPresentIdCondition;
	}

	/**
	 * 设置悦卡赠送ID查询条件
	 * 
	 * @param cardPresentIdCondition 悦卡赠送ID查询条件
	 */
	public void setCardPresentIdCondition(Condition<String> cardPresentIdCondition) {
		this.cardPresentIdCondition = cardPresentIdCondition;
	}

	/**
	 * 构造并返回会员ID（赠送方）（冗余）查询条件
	 * 
	 * @return memberIdCondition 会员ID（赠送方）（冗余）查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID（赠送方）（冗余）查询条件
	 * 
	 * @return memberIdCondition 会员ID（赠送方）（冗余）查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID（赠送方）（冗余）查询条件
	 * 
	 * @param memberIdCondition 会员ID（赠送方）（冗余）查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回悦卡模板ID（冗余）查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板ID（冗余）查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板ID（冗余）查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回会员悦卡ID（冗余）查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID（冗余）查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取会员悦卡ID（冗余）查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID（冗余）查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置会员悦卡ID（冗余）查询条件
	 * 
	 * @param memberCardIdCondition 会员悦卡ID（冗余）查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回提取码查询条件
	 * 
	 * @return extractedCodeCondition 提取码查询条件
	 */
	public Condition<String> extractedCode() {
		this.extractedCodeCondition = new Condition<>();
		return this.extractedCodeCondition;
	}
	
	/**
	 * 获取提取码查询条件
	 * 
	 * @return extractedCodeCondition 提取码查询条件
	 */
	public Condition<String> getExtractedCodeCondition() {
		return extractedCodeCondition;
	}

	/**
	 * 设置提取码查询条件
	 * 
	 * @param extractedCodeCondition 提取码查询条件
	 */
	public void setExtractedCodeCondition(Condition<String> extractedCodeCondition) {
		this.extractedCodeCondition = extractedCodeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return extractedMemberIdCondition 查询条件
	 */
	public Condition<String> extractedMemberId() {
		this.extractedMemberIdCondition = new Condition<>();
		return this.extractedMemberIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return extractedMemberIdCondition 查询条件
	 */
	public Condition<String> getExtractedMemberIdCondition() {
		return extractedMemberIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param extractedMemberIdCondition 查询条件
	 */
	public void setExtractedMemberIdCondition(Condition<String> extractedMemberIdCondition) {
		this.extractedMemberIdCondition = extractedMemberIdCondition;
	}

	/**
	 * 构造并返回提取时间查询条件
	 * 
	 * @return extractedTimeCondition 提取时间查询条件
	 */
	public Condition<LocalDateTime> extractedTime() {
		this.extractedTimeCondition = new Condition<>();
		return this.extractedTimeCondition;
	}
	
	/**
	 * 获取提取时间查询条件
	 * 
	 * @return extractedTimeCondition 提取时间查询条件
	 */
	public Condition<LocalDateTime> getExtractedTimeCondition() {
		return extractedTimeCondition;
	}

	/**
	 * 设置提取时间查询条件
	 * 
	 * @param extractedTimeCondition 提取时间查询条件
	 */
	public void setExtractedTimeCondition(Condition<LocalDateTime> extractedTimeCondition) {
		this.extractedTimeCondition = extractedTimeCondition;
	}

	/**
	 * 构造并返回赠送生成的悦卡ID（旧悦卡保留）查询条件
	 * 
	 * @return extractedMemberCardIdCondition 赠送生成的悦卡ID（旧悦卡保留）查询条件
	 */
	public Condition<String> extractedMemberCardId() {
		this.extractedMemberCardIdCondition = new Condition<>();
		return this.extractedMemberCardIdCondition;
	}
	
	/**
	 * 获取赠送生成的悦卡ID（旧悦卡保留）查询条件
	 * 
	 * @return extractedMemberCardIdCondition 赠送生成的悦卡ID（旧悦卡保留）查询条件
	 */
	public Condition<String> getExtractedMemberCardIdCondition() {
		return extractedMemberCardIdCondition;
	}

	/**
	 * 设置赠送生成的悦卡ID（旧悦卡保留）查询条件
	 * 
	 * @param extractedMemberCardIdCondition 赠送生成的悦卡ID（旧悦卡保留）查询条件
	 */
	public void setExtractedMemberCardIdCondition(Condition<String> extractedMemberCardIdCondition) {
		this.extractedMemberCardIdCondition = extractedMemberCardIdCondition;
	}

	/**
	 * 构造并返回[枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 * 
	 * @return stageCondition [枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 */
	public Condition<CardExtractCodeStage> stage() {
		this.stageCondition = new Condition<>();
		return this.stageCondition;
	}
	
	/**
	 * 获取[枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 * 
	 * @return stageCondition [枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 */
	public Condition<CardExtractCodeStage> getStageCondition() {
		return stageCondition;
	}

	/**
	 * 设置[枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 * 
	 * @param stageCondition [枚举]赠送阶段：0-赠送中-PRESENTING、1-已提取-EXTRACTED、2-已拒绝-REJECTED、3-已失效-EXPIRED查询条件
	 */
	public void setStageCondition(Condition<CardExtractCodeStage> stageCondition) {
		this.stageCondition = stageCondition;
	}

	/**
	 * 构造并返回赠送时间查询条件
	 * 
	 * @return createdTimeCondition 赠送时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取赠送时间查询条件
	 * 
	 * @return createdTimeCondition 赠送时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置赠送时间查询条件
	 * 
	 * @param createdTimeCondition 赠送时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回失效时间查询条件
	 * 
	 * @return expiredTimeCondition 失效时间查询条件
	 */
	public Condition<LocalDateTime> expiredTime() {
		this.expiredTimeCondition = new Condition<>();
		return this.expiredTimeCondition;
	}
	
	/**
	 * 获取失效时间查询条件
	 * 
	 * @return expiredTimeCondition 失效时间查询条件
	 */
	public Condition<LocalDateTime> getExpiredTimeCondition() {
		return expiredTimeCondition;
	}

	/**
	 * 设置失效时间查询条件
	 * 
	 * @param expiredTimeCondition 失效时间查询条件
	 */
	public void setExpiredTimeCondition(Condition<LocalDateTime> expiredTimeCondition) {
		this.expiredTimeCondition = expiredTimeCondition;
	}

}
